package com.utils.report;

import java.util.HashMap;

/**
 * 文件上传抽象类
 * @author mapei
 *
 */
public abstract class FileUploadBase{
	private static HashMap<String, String> extMap = null;//文件扩展名设定
	//初始化文件扩展名
	static{
		extMap = new HashMap<String, String>();
		extMap.put("image", "gif,jpg,jpeg,png,bmp");
		extMap.put("flash", "swf,flv");
		extMap.put("media", "swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb");
		extMap.put("file", "doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2,gif,jpg,jpeg,png,bmp");
		extMap.put("excel", "xls,xlsx");
		extMap.put("rarFile", "rar,zip");
	}
	public FileUploadBase() {
		
	}
	//文件上传
	public abstract void upload();
	
	public static HashMap<String, String> getExtMap() {
		return extMap;
	}
}
